Welcome to PythonDay Tutorial

Python is crossplatform this means you can get it run in almost every where. Here is an installation guideline for the major OS.

OS X and Ubuntu

For OS X and Ubuntu, you already get Python come along with the OS.

Windows OS

For Windows, you can download original installer file from the official page or using the conda package. Anyway, I normally use conda because some modules and package dependency that I'm using have been managed better.

Please, add the directory /Scripts into you system path.

set PATH=%PATH%;C:\Anaconda\Scripts

IPython

Next we need IPython in this tutorial. IPython is an interactive python it comes along with many useful feature, e.g. auto completetion and this notebook. To install Ipython, you may use the following commands;

pip install ipython

or

conda update conda
conda update ipython

IPython had Ipython Notebook but recently the project has been move to Jupyter, see more detail http://ipython.org/. IPython has many magic commad, plese check example below. Jupyter help magic commad


In [3]:
! python --version


Python 2.7.11 :: Anaconda 2.1.0 (64-bit)

In [4]:
! ping www.bbc.co.uk


Pinging www.bbc.net.uk [212.58.246.92] with 32 bytes of data:
Reply from 212.58.246.92: bytes=32 time=206ms TTL=48
Reply from 212.58.246.92: bytes=32 time=206ms TTL=48
Reply from 212.58.246.92: bytes=32 time=209ms TTL=48
Reply from 212.58.246.92: bytes=32 time=209ms TTL=48

Ping statistics for 212.58.246.92:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 206ms, Maximum = 209ms, Average = 207ms

In [5]:
%timeit range(1000)


10000 loops, best of 3: 25.7 µs per loop

Git

All codes in this tutorial will be posted on Github. Please install Git or Github Desktop. https://desktop.github.com/


In [ ]: